package com.zmzncs.lmtc.module.promotion.dao;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.zmzncs.lmtc.module.promotion.pojo.month_rule.MWMonthRule;
import com.zmzncs.lmtc.module.promotion.pojo.month_rule.MonthRule;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.zmzncs.lmtc.module.promotion.pojo.month_rule.MonthRuleDTO;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author 任建波
 * @since 2020-08-12
 */
@Repository
public interface MonthRuleMapper extends BaseMapper<MonthRule> {

    /**获取月租规则*/
    IPage<MonthRuleDTO> getMonthRuleParkList(Page page, @Param("keyword") String keyword);
    /**根据名称查询规则*/
    List<MonthRuleDTO> getMonthRuleByName(@Param("ruleName") String ruleName);

    /** 查询咪网停车场月租车规则*/
    List<MWMonthRule> getMWMonthRuleByParkId(@Param("ruleName")Long parkId,@Param("status") Integer status);

    /**根据停车场ID查询停车场月租规则*/
    List<MonthRuleDTO> getMonthRuleByParkId(@Param("parkId") Long parkId);

    /**模糊查询月租规则名称*/
    IPage<MonthRuleDTO> getMonthName(Page page,@Param("ruleName") String ruleName);


}
